

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;

public class CDataInputStream  extends DataInputStream {
    /**
     * Creates a DataInputStream that uses the specified
     * underlying InputStream.
     *
     * @param in the specified input stream
     */
    public CDataInputStream(InputStream in) {
        super(in);
    }


    public String readString(int length) throws IOException {
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < length; i++){
            sb.append(Character.getNumericValue(Integer.valueOf(this.readByte())));
        }
        return sb.toString();
    }


}
